package framework;

/**
 * This class models a file.
 *
 */

public class File extends FolderItem {
	
	/**
	 * The extension of a file.
	 */
	private String extension;
	
	/**
	 * The size of a file.
	 */
	private int size;

	/**
	 * Construct a <code>File</code> object
	 * by using the constructor of <code>FolderItem</code>.
	 * @param initialName the name of the file.
	 * @param initialExtension the extension of the file.
	 * @param initialSize the size of the file.
	 * 
	 */
	public File(String initialName, String initialExtension, int initialSize) {
		super(initialName);
		extension = initialExtension;
		size = initialSize;
	}

	/**
	 * Get the extension of the file.
	 * @return the extension of the file.
	 */
	public String getExtension() {
		return extension;
	}

	/**
	 * Get the size of the file.
	 * @return the size of the file.
	 */
	public int getSize() {
		return size;
	}

	/**
	 * Set a new extension of the file.
	 * @param newExtension the new extension of the file.
	 */
	public void setExtension(String newExtension) {
		extension = newExtension;
	}
}
